'use strict';

module.exports = app => {
  const { INTEGER, DATE, JSON, BOOLEAN } = app.Sequelize;

  const Session = app.model.define('session', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    user_id: { type: INTEGER },
    urls: JSON,
    isAdmin: { type: BOOLEAN, field: 'isAdmin' },
    created_at: DATE,
    updated_at: DATE,
  });

  return Session;
};
